package test;
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class SetBean extends HttpServlet{
	@Override
	protected void doGet(HttpServletRequest request,HttpServletResponse response)throws ServletException,IOException{
		Address addr=new Address("重庆","沙坪坝区");
		Student stu=new Student("李某",10,addr);
		request.setAttribute("addr", addr);
		request.setAttribute("stu", stu);
		RequestDispatcher rd=request.getRequestDispatcher("readbean.jsp");
		rd.forward(request, response);
	}
}
